// 1.个人中心头部
const Header = (resolve) => {
  import('src/header/header').then((module) => {
    resolve(module)
  })
}

const Mall = (resolve) => {
  import('src/mall/index/index').then((module) => {
    resolve(module)
  })
}

const RecoredList = (resolve) => {
  import('src/mall/record/list').then((module) => {
    resolve(module)
  })
}

const RecoredDetails = (resolve) => {
  import('src/mall/record/details').then((module) => {
    resolve(module)
  })
}

const GoodsDetails = (resolve) => {
  import('src/mall/goods/details').then((module) => {
    resolve(module)
  })
}

const AddressManagement = (resolve) => {
  import('src/mall/address/management_list').then((module) => {
    resolve(module)
  })
}

const AddressEdit = (resolve) => {
  import('src/mall/address/edit').then((module) => {
    resolve(module)
  })
}

const AddressAdd = (resolve) => {
  import('src/mall/address/add').then((module) => {
    resolve(module)
  })
}

const AddressSelect = (resolve) => {
  import('src/mall/address/select_list').then((module) => {
    resolve(module)
  })
}

const OrderCheck = (resolve) => {
  import('src/mall/order/check').then((module) => {
    resolve(module)
  })
}

const OrderResult = (resolve) => {
  import('src/mall/order/result').then((module) => {
    resolve(module)
  })
}

export default [
  {
    path: '/mall',
    meta: {
      title: '积分商城'
    },
    name: 'mall',
    components: {
      header: Header,
      content: Mall
    }
  },
  {
    path: '/record_list',
    meta: {
      title: '兑换记录'
    },
    name: 'record_list',
    components: {
      header: Header,
      content: RecoredList
    }
  },
  {
    path: '/record_details/:id',
    meta: {
      title: '兑换详情'
    },
    name: 'record_details',
    components: {
      header: Header,
      content: RecoredDetails
    }
  },
  {
    path: '/goods_details/:goods_id',
    meta: {
      title: '商品详情'
    },
    name: 'goods_details',
    components: {
      header: Header,
      content: GoodsDetails
    }
  },
  {
    path: '/address_management',
    meta: {
      title: '地址管理'
    },
    name: 'address_management',
    components: {
      header: Header,
      content: AddressManagement
    }
  },
  {
    path: '/address_add',
    meta: {
      title: '添加地址'
    },
    name: 'address_add',
    components: {
      header: Header,
      content: AddressAdd
    }
  },
  {
    path: '/address_edit/:id',
    meta: {
      title: '编辑地址'
    },
    name: 'address_edit',
    components: {
      header: Header,
      content: AddressEdit
    }
  },
  {
    path: '/address_select/:id',
    meta: {
      title: '选择地址'
    },
    name: 'address_select',
    components: {
      header: Header,
      content: AddressSelect
    }
  },
  {
    path: '/order_check',
    meta: {
      title: '确认兑换'
    },
    name: 'order_check',
    components: {
      header: Header,
      content: OrderCheck
    }
  },
  {
    path: '/order_result/:id',
    meta: {
      title: '兑换成功'
    },
    name: 'order_result',
    components: {
      header: Header,
      content: OrderResult
    }
  }
]
